<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<script eventType="text/javascript">


	function validate_required(field, alerttxt) {
		with (field) {
			if (value == null || value == "") {
				alert(alerttxt);
				return false
			} else {
				return true
			}
		}
	}

	function validate_email(field, alerttxt) {
		with (field) {
			apos = value.indexOf("@")
			dotpos = value.lastIndexOf(".")
			if (apos < 1 || dotpos - apos < 2) {
				alert(alerttxt);
				return false
			} else {
				return true
			}
		}
	}


	function validate_form(thisform) {
		with (thisform) {
			if (validate_email(email, "Email must be filled out!") == false) {
				email.focus();
				return false
			}
		}
	}
</script>
</head>

<body>
<form action="submitpage.htm" onsubmit="return validate_form(this)" method="post">
Email: <input eventType="text" name="email" size="30">
<input eventType="submit" value="Submit">
</form>
</body>

</html>